package com.arofoxmsn.repository.message;

import java.util.List;
import org.hibernate.criterion.Restrictions;
import com.arofoxmsn.model.User;
import com.arofoxmsn.model.message.Message;
import com.arofoxmsn.repository.BaseTable;

public class MessageTable extends BaseTable<Message>{

	@Override
	protected Class getModelClass() {return Message.class;}
	
	public List<Message> retrieveAllByUser(User user){
		return retrieveAll(Restrictions.eq("userFrom", user));
	}

}
